
<div class="col-sm-10">
    <ol class="breadcrumb">
        <li class="active">文件管理
        </li>
        <li class="active">文件列表
        </li>
    </ol>
    <div class="panel panel-default">

        <div class="panel-heading">
            修改文件
        </div>
        <div class="panel-body">
            <div class="table-responsive input-form">
                <!--
                <form action="/admin/product/doproductadd" method="post" enctype="multipart/form-data">
                    <ul>
                        <li>在原服务器中的相对路径: <input type="text" name="title" /></li>
                        <li>  文 &nbsp 件 &nbsp 本 &nbsp 体 &nbsp : &nbsp&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp <input type="file" name="pic"/></li>
                        <li>
                            文件描述:
                            <textarea name="description" id="" cols="60" rows="8"></textarea>
                        </li>

                        <li>
                            <br/>
                            <button type="submit" class="btn btn-default">提交</button>
                        </li>

                    </ul>


                </form>
                -->

                <?php
                use yii\widgets\ActiveForm;
                use yii\helpers\ArrayHelper;

                $form=ActiveForm::begin(
                    ['options'=>[
                        'enctype'=>'multipart/form-data'
                    ],
                        'method'=>'post',
                        //还有action可以改
                    ]
                );

                ?>
                <?=$form->field($model,'id')->hiddenInput(['value'=>$upload->id,'name'=>"id"])->label(false);?>
                <?=$form->field($model,'path')->textInput(['maxlength' => 255,'name'=>"在原服务器中的相对路径",'style'=>"width:300px;","value"=>"$upload->sourcepath"])->label("在原服务器中的相对路径:");?>
                <?=$form->field($model,'File')->fileInput()->hint('目前在存储服务器上的位置是:'.$upload->filepath)->label("文件:")?>
                <?=$form->field($model,'storagetime')->textInput(['maxlength' => 255,'name'=>"storagetime",'style'=>"width:300px;","value"=>date('Y-m-d H:i:s',$upload->deletetime)])->label("有效期:");?>
                <?=$form->field($model, 'project')->dropDownList(ArrayHelper::map($projects,'id', 'name'), ['prompt'=>'请选择','style'=>'width:120px',"name"=>"project",'options' => [$upload->projectid => ['selected' => true]],])->label("项目:") ?>


                <button>Submit</button>


                <?php ActiveForm::end(); ?>

            </div>
        </div>


    </div>

</div>
